
<%@ page import="org.xilin.Course" %>

<g:setProvider library="jquery"/>

<div>
    <table>
        <tbody>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="name"><g:message code="course.name.label" default="Name" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="name" value="${courseInstance?.name}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="capacity"><g:message code="course.capacity.label" default="Capacity" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="capacity" value="${fieldValue(bean: courseInstance, field: 'capacity')}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="regCapacity"><g:message code="course.regCapacity.label" default="Reg Capacity" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="regCapacity" value="${fieldValue(bean: courseInstance, field: 'regCapacity')}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="price"><g:message code="course.price.label" default="Price" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="price" value="${fieldValue(bean: courseInstance, field: 'price')}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="startTime"><g:message code="course.startTime.label" default="Start Time" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="startTime" maxlength="8" value="${courseInstance?.startTime}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="endTime"><g:message code="course.endTime.label" default="End Time" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="endTime" maxlength="8" value="${courseInstance?.endTime}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="status"><g:message code="course.status.label" default="Active" /></label>
                </td>
                <td valign="top" class="value">
                    <g:checkBox name="status" value="${courseInstance?.status}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="desc1"><g:message code="course.desc1.label" default="Desc1" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="desc1" value="${courseInstance?.desc1}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="desc2"><g:message code="course.desc2.label" default="Desc2" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="desc2" value="${courseInstance?.desc2}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="grade"><g:message code="course.grade.label" default="Grade" /></label>
                </td>
                <td valign="top" class="value">
                    <g:textField name="grade" value="${courseInstance?.grade}" />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="classRoom"><g:message code="course.classRoom.label" default="Class Room" /></label>
                </td>
                <td valign="top" class="value">
                    <g:select name="classRoom.id" from="${org.xilin.RoomSchedule.list()}" optionKey="id" value="${courseInstance?.classRoom?.id}"  />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="teacher"><g:message code="course.teacher.label" default="Teacher" /></label>
                </td>
                <td valign="top" class="value">
                    <g:select name="teacher.id" from="${org.xilin.Teacher.list()}" optionKey="id" value="${courseInstance?.teacher?.id}"  />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="book"><g:message code="course.book.label" default="Book" /></label>
                </td>
                <td valign="top" class="value">
                    <g:select name="book.id" from="${org.xilin.Book.list()}" optionKey="id" value="${courseInstance?.book?.id}"  />
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="semester"><g:message code="course.semester.label" default="Semester" /></label>
                </td>
                <td valign="top" class="value">
                    <g:select name="semester.id" from="${org.xilin.Semester.list()}" optionKey="id" value="${courseInstance?.semester?.id}"  />
                </td>
            </tr>

        </tbody>
    </table>
</div>
